pow.webserver
Class SGBDfeeder

java.lang.Object
  extended by pow.webserver.SGBDfeeder
All Implemented Interfaces:
java.lang.Runnable

public class SGBDfeeder
extends java.lang.Object
implements java.lang.Runnable

thread which waits for ivy messages sent by event source (serveur.java) and stores them into a mysql database the ivy messages are extracted from a blocking queue (fifo) parameter of the database are extracted from conf file


Constructor Summary
SGBDfeeder(java.lang.String dbname, java.lang.String dbuser, java.lang.String dbpwd, DbMode mode)
          create a thread which fill the database with the message it extracts from the fifo
 
Method Summary
 java.util.concurrent.LinkedBlockingQueue<IvyMsg> getQueueFIFO()
           
 void kill()
          stop the thread by ending run method used caused Thread.stop is now deprecated
 void run()
          listens fifo queue and stores ivy messages in database if the message has the DECONNECT type it also fills the end field corresponding to this ivy session into the 'connexion' table
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SGBDfeeder

public SGBDfeeder(java.lang.String dbname,
                  java.lang.String dbuser,
                  java.lang.String dbpwd,
                  DbMode mode)
create a thread which fill the database with the message it extracts from the fifo

Parameters:
dbname - the name of the database
dbuser - the user login to connect to the database
dbpwd - the user password to connect to the database
Method Detail

getQueueFIFO

public java.util.concurrent.LinkedBlockingQueue<IvyMsg> getQueueFIFO()
Returns:
the fifo to communicate with the database feeder

kill

public void kill()
stop the thread by ending run method used caused Thread.stop is now deprecated


run

public void run()
listens fifo queue and stores ivy messages in database if the message has the DECONNECT type it also fills the end field corresponding to this ivy session into the 'connexion' table

Specified by:
run in interface java.lang.Runnable